package com.example.demo.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.example.demo.entity.Book;

public interface BookRepository extends JpaRepository<Book, Integer>{

	@Query(value="from Book")
	List<Book> getAll();

	@Query("from Book where name=:name")
	List<Book> getByName(@Param("name") String name);
}
